

//随机颜色
function getColor(){
	return 'rgb(' + parseInt( Math.random()*256) + ',' + parseInt( Math.random()*256) + ',' + parseInt( Math.random()*256) + ')';            
}


//或者这个
function randomColor(){
//"#FFFFFF"
	var arr = [0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F'];
	var str = "#";
	for (var i=0; i<6; i++){
		str += arr[ parseInt(Math.random()*16) ];
	}
	return str;
}

//随机数
function randomNum(num){
	return parseInt( Math.random()*num );
}


//随机坐标
function randomPoint(){
    var x = parseInt( Math.random() * document.documentElement.clientWidth );
    var y = parseInt( Math.random() * document.documentElement.clientHeight );
    return {left:x, top:y};
}



